﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WakeTheServer
{
    public class MACAddress
    {
        private byte[] bytes;

        public MACAddress(byte[] bytes)
        {
            if (bytes.Length != 6)
                throw new System.ArgumentException("MAC address must have 6 bytes");
            this.bytes = bytes;
        }

        public byte this[int i]
        {
            get { return this.bytes[i]; }
            set { this.bytes[i] = value; }
        }

        public override string ToString()
        {
            return BitConverter.ToString(this.bytes, 0, 6);
        }
    }
}
